package com.weixing.mall.provider.model.vo;

import lombok.Data;

/**
 * @ClassName RuleInfoVo
 * @Description
 * @Author Small
 * @Date 2019/10/22 15:18
 * @Version 1.0
 **/
@Data
public class RebateRuleInfoVo {

    /**
     * 规则详情code
    */
    private int infoCode;
    /**
     * 规则详情描述
     */
    private String ruleInfo;
    /**
     * 经销商（值为1是代表前台可以设置该属性的值）
     */
    private int agentLevel1;
    private int agentLevel1Editable;
    /**
     * 一级代理
     */
    private int agentLevel2;
    private int agentLevel2Editable;
    /**
     * 二级代理
     */
    private int agentLevel3;
    private int agentLevel3Editable;
    /**
     * 三级代理
     */
    private int agentLevel4;
    private int agentLevel4Editable;
    /**
     * 四级代理
     */
    private int agentLevel5;
    private int agentLevel5Editable;
    /**
     * 五级代理
     */
    private int agentLevel6;
    private int agentLevel6Editable;
    private String remark;
    private int orderBy;

    public void setLevelEnable(int level,int enable){
        switch (level){
            case 1:
                this.agentLevel1Editable = enable;
                break;
            case 2:
                this.agentLevel2Editable = enable;
                break;
            case 3:
                this.agentLevel3Editable = enable;
                break;
            case 4:
                this.agentLevel4Editable = enable;
                break;
            case 5:
                this.agentLevel5Editable = enable;
                break;
            case 6:
                this.agentLevel6Editable = enable;
                break;

        }
    }
}
